package com.ysstech.system.service;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ysstech.common.entity.PageBean;
import com.ysstech.common.entity.User;
import com.ysstech.common.util.resultutil.RestResult;
import com.ysstech.system.entity.UserRole;

/**
 * <p>
 * 用户服务类
 * </p>
 *
 * @author lishuangliang
 * @since 2020-09-11
 */
public interface UserService extends IService<User> {
    /**
     * 用户登录方法
     *
     * @param user
     * @return
     * @throws Exception
     */
    public User login(User user) throws Exception;

    /**
     * 查询用户列表信息
     *
     * @param user
     * @param pageBean
     * @return
     * @throws Exception
     */
    public PageBean<User> queryAllUsers(User user, PageBean pageBean) throws Exception;

    /**
     * 更新用户角色信息
     *
     * @param list
     * @throws Exception
     */
    public void batchInserUserRole(List<UserRole> list) throws Exception;

    /**
     * 批量删除用户信息
     *
     * @param ids
     * @throws Exception
     */
    public void batchDeleteUser(List<String> ids) throws Exception;


    /**
     * 锁定或者解锁用户
     *
     * @param list
     * @return
     */
    public void updateIsLock(List<User> list) throws Exception;


    /**
     * 导出用户信息
     *
     * @param response
     * @param user
     * @throws Exception
     */
    public void userexport(HttpServletResponse response, User user) throws Exception;

    /**
     * 重置用户密码
     *
     * @param list
     * @throws Exception
     */
    public void resetPassword(List<String> list) throws Exception;

    /**
     * 更攺用户密码
     *
     * @param oldPassword    旧密码
     * @param newPassword    新密码
     * @param affirmPassword 重复新密码
     * @throws Exception
     */
    public void updateUserPassword(String oldPassword, String newPassword, String affirmPassword) throws Exception;


    public RestResult scheduleTest(String code) throws Exception;
}
